package com.crm.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.crm.model.Company;
import com.baomidou.mybatisplus.extension.service.IService;
import com.crm.model.dto.CompanyDTO;
import com.crm.model.dto.ContactDTO;
import com.crm.model.query.CompanyQuery;
import com.crm.model.vo.CompanyVO;
import com.sun.org.apache.bcel.internal.classfile.Code;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * <p>
 * 公司 服务类
 * </p>
 *
 * @author zjd
 * @since 2021-04-01
 */
public interface ICompanyService extends IService<Company> {

    Boolean deleteCompanyById(Long companyId);

    Company addCompany(CompanyDTO dto);

    Boolean addCompanyAppertain(Long companyId,Long targetCompanyId, Integer type);

    CompanyVO findCompanyInfoById(Long companyId);

    Page<Company> listCompany(CompanyQuery companyQuery, Integer current, Integer size);

    Company updateCompany(CompanyDTO dto);

    Boolean addCompanyContact(ContactDTO contactDTO);

    Boolean assignCompanyForUser(Long userId,Long companyId);

    Boolean mergeCompany(Long targetCompanyId, Long companyId);

    Page<Company> listCompany(CompanyQuery companyQuery, Pageable pageable);
}
